It is important in a large variety of electrical devices to be able to detect the peak value of a digital or analog signal, or to determine if the amplitude of a digital or analog signal has exceeded a predetermined value. For example, it may be necessary to determine if a signal is present or to recognize if a signal that is present has a amplitude exceeding a threshold, such as a value corresponding to a specific logic level. A peak detector 10 conventionally used for this purpose is shown in FIG. 1. The peak detector 10 receives an input signal VIN at a non-inverting input of an operational amplifier 14. The output of the operational amplifier 14 is connected to the gate of an NMOS transistor 16, which has its drain connected to a voltage VDD and its source connected to a capacitor 18 and to the inverting input of the operational amplifier 14. As is well known in the art, a signal provided to the inverting input of the operational amplifier 14 provides negative feedback.
The operation of the peak detector 10 will now be explained. It is assumed that the capacitor 18 is initially discharged. When the voltage VIN increases, the output of the operational amplifier 14 will also increase. The voltage at the output of the operational amplifier 14 can be expected to quickly increase to the full output of the amplifier 14 because of the high gain that is typically achieved in operational amplifiers. As a result, the transistor 16 will be turned ON, thereby coupling the supply voltage VCC to the capacitor 18. The capacitor 18 will then be charged until the voltage VOUT is equal to VIN. When VOUT is equal to VIN, the output of the operational amplifier 14 will transition low, thereby turning OFF the transistor 16 and holding the voltage VOUT at the voltage VIN. If the voltage VIN subsequently increases, the output of the amplifier 14 will again transition high to turn ON the transistor 16 until VOUT is again equal to VIN. In this manner, the amplitude of VOUT will always be equal to the peak value of signal VIN.
The peak detector 10 shown in FIG. 1 provides good performance in many applications. However, it may not be used in some situations. For example, the peak detector 10 cannot be used to determine the peak value of a differential signal, i.e., the maximum differential voltage between two signal lines. This limitation is particularly true if both of the signal lines are allowed to “float” so that the voltage on either of the signal lines can have any value.
Another limitation on the use of the peak detector 10 is that it can only be used to determine the peak value of a signal having a positive voltage. Although the peak detector 10 could be redesigned to detect the peak negative value of an input signal, it is important in some cases to determine whether the peak positive or peak negative value of the signal exceeds some threshold. For example, the signal applied to the peak detector may be an AC signal, which may have either a peak positive voltage or a peak negative voltage. The difficulty in detecting an input signal having either a peak positive voltage or a peak negative voltage is exacerbated when the input signal is a differential signal.
There is therefore a need for a peak detector that can detect the peak absolute differential amplitude of a differential input signal or determine if the peak absolute differential amplitude of the input signal exceeds a predetermined threshold.